|
![](/i/fill.gif) |
Thats what the function was about. I'm not very used
to functions, but they return only float values AFAIK.
Thus, you'd need to have three functions, each using
the pigment from the texture, and then accessing
only red, green and blue via .red, .blue und .green.
You've got to look at the documentation for that.
Your method is only useful for coloring objects, but not
when I want to calculate stuff based on the color...
Regards,
Tim
--
Tim Nikias v2.0
Homepage: http://www.digitaltwilight.de/no_lights
Email: Tim### [at] gmx de
> Hello,
>
> I experienced similar problem, I needed the color from texture at point P.
> The trick which worked for me was:
>
> #declare TEX=texture {
> ....
> }
>
> sphere {
> <0, 0, 0>, 1
> texture {
> TEX
> translate -P
> scale 1000
> ...
> }
> translate ...
> ...
> }
>
> This way the spere has color from the given point on texture. But if there
> is some better way, please enlighten me, i would like something:
>
> color=TEX[P]
>
> or alike :)
>
>
> Regards,
> Vlada
>
Post a reply to this message
|
![](/i/fill.gif) |